package cn.caskm.souvenirshopsystem.service;

import cn.caskm.souvenirshopsystem.domain.Result;
import cn.caskm.souvenirshopsystem.domain.dto.PageDTO;
import cn.caskm.souvenirshopsystem.domain.po.Goods;
import cn.caskm.souvenirshopsystem.domain.query.AdminGoodsQuery;
import cn.caskm.souvenirshopsystem.domain.query.CategoryGoodsQuery;
import cn.caskm.souvenirshopsystem.domain.query.PageQuery;
import cn.caskm.souvenirshopsystem.domain.vo.AdminGoodsListVO;
import cn.caskm.souvenirshopsystem.domain.vo.GoodsDetailVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface GoodsService extends IService<Goods> {

    Result<PageDTO<AdminGoodsListVO>> page(AdminGoodsQuery query);
    
    Result<List<Goods>> getAll();

    Result<Goods> detail(Integer id);

    void saveOrUpdateEntity(Goods goods);

    Result<PageDTO<Goods>> getRecommendList(PageQuery query);

    Result<PageDTO<Goods>> getByCategory(CategoryGoodsQuery query);

    Result<GoodsDetailVO> getGoodsDetail(Integer goodsId);

}
